import java.util.Stack;
/*class a {
    /*public static boolean  isValid(String s) {
        Stack<Character> a = new Stack<>();
        int i = 0;
        for (i = 0; i < s.length(); i++) {
            char ch = s.charAt(i);
            if (ch == '(' || ch == '{' || ch == '[') {
                a.push(ch);
            } else {

                if (ch == ')' && a.peek() == '(' || ch == '}' && a.peek() == '{' || ch == ']' && a.peek() == '[') {
                    a.pop();
                } else {
                    return false;
                }

            }
        }
        if (!a.empty()) {
            return false;
        }
        return true;


    }



            if(tokens[i].equals"+"||tokens[i]=="-"||tokens[i]=="*"||tokens[i]=="/")
            {
                int x=a.pop();
                int y=a.pop();
                switch(tokens[i])
                {
                    case"+":
                        a.push(y+x);
                        break;
                    case"-":
                        a.push(y-x);
                        break;
                    case"*":
                        a.push(y*x);
                        break;
                    case"/":
                        a.push(y/x);
                        break;

                }

            }
            else
            {
                a.push(Integer.parseInt(tokens[i]));
            }
        }
        return a.pop();

    }

}







public class text78 {
    public static void main(String[] args) {
        String[]d={"4","13","5","/","+"};
        a b=new a();
        int c=a.evalRPN(d);
        System.out.println(c);


    }
    public static void main1(String[] args) {

        String s = "()[]";
        a b=new a();
        //boolean c= a.isValid(s);
        //System.out.println(c);





        /*Stack<Integer>a=new Stack<>();
        a.push(1);
        a.push(2);
        a.push(3);
        a.push(4);
        a.pop();
        int b=a.pop();
        System.out.println(b);
        int c=a.peek();
        System.out.println(c);
        System.out.println(a.empty());

         */


    //}
//}
